package com.tester.zc.test001.fifth;

/**
 *题目:5.请使用适配器模式实现场景民用电220V交流电，但手机使用5V直流电，因此给手机充电时需要使用电源适配器进行转换,写出事例代码
 *
 * @Author zhoucan
 * @Date 2022/12/4
 */
public class VoltageAdapterTest {

    public static void main(String[] args) {
        TwoHundredAndTwentyVolts twoHundredAndTwentyVolts = new TwoHundredAndTwentyVolts();
        FiveVolts fiveVolts = new VoltageAdapter(twoHundredAndTwentyVolts);
        System.out.println("输出电压:"+fiveVolts.outputFiveVolts());
    }
}
